<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>管理文章</title>
		<script src="js/jquery.js" type="text/javascript"></script>
		<script src="js/table.js" type="text/javascript"></script>
		<script type="text/javascript">
			function deleteArticle(){
				var result=confirm("确认删除吗？");
				return result;
			}		
		</script>
	</head>
	<body>
		<h1>
			管理${category.name}文章
		</h1>
		<s:form id="mainForm" namespace="/paper" action="managePapers" method="post">
			<input type="hidden" name="cid" id="cid" value="${cid}"/>
			<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
			<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
			<input type="hidden" name="page.order" id="order" value="${page.order}"/>
			<table class="table_items" style="width:735px;">
				<thead>
					<tr>
						<s:iterator value="tableHeaders">
							<th width="${hdwidth}" >
								${title} 
							</th>								
						</s:iterator>
					</tr>					
				</thead>
				<tbody>
					<s:iterator value="page.result">
						<tr>
							<td>
								<a href="paper/viewPaperByUuid.action?uuid=${uuid}">${title}</a>
							</td>
							<td>
								${authorName}
							</td>
							<td>
								${source}
							</td>
							<td>
								<s:date name="publishDate" format="yyyy-MM-dd"/>
							</td>
							<td>
								<a href="paper/editOrAddPaper.action?uuid=${uuid}&cid=${cid}" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-edit'"></a>
							</td>
							<td>
								<a href="paper/deletePaperByUuid.action?uuid=${uuid}&cid=${cid}" class="easyui-linkbutton" onclick="return deleteArticle();" data-options="plain:true,iconCls:'icon-cancel'"></a>
							</td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
		</s:form>
		<jsp:include page="../page.jsp"></jsp:include>
	</body>
</html>